<%@ page contentType="text/html; charset=utf-8"%>
<%@ page language="java" import="com.java.util.NameCheck"%>
<jsp:useBean id="NC" class="com.java.util.NameCheck" scope="application" />
<%
request.setCharacterEncoding("utf-8");

	String SITEID = "E110";
    String SITEPW = "38523506";
    HttpSession s = request.getSession( true );
    s.putValue("NmChkSec","98u9iuhuyg87");
    
    String sJumin1 ="";
    String sJumin2 = "";
    String sJumin ="";
    String sName ="";
    String ent_id = request.getParameter( "ent_id" );
    if ( !s.getValue( "NmChkSec" ).equals( "98u9iuhuyg87" ) )
    {
        // 인증이 안되는 경우...
    }

    //s.invalidate();
	
    System.out.println( ent_id+":||||||||||||||||||||||||||||||||||||");
    
    sJumin1 = request.getParameter( "soc_no1" );
    sJumin2 = request.getParameter( "soc_no2" );
    sJumin = sJumin1 + sJumin2;
   //String sName = new String( request.getParameter( "name" ).getBytes( "8859_1" ), "KSC5601" );
   //String sName = new String( request.getParameter( "name" ).getBytes( "8859_1" ), "utf-8" );
    sName = request.getParameter( "login_nm" );   
    
    if ( ( !sJumin.equals( "" ) ) && ( !sName.equals( "" ) ) )
    {
        String Rtn = "";
        NC.setChkName( sName ); // 
        Rtn = NC.setJumin( sJumin + SITEPW );
        if ( Rtn.equals( "0" ) )
        {
            NC.setSiteCode( SITEID );
            NC.setTimeOut( 30000 );
            Rtn = NC.getRtn().trim();
        }
		
        System.out.println( sJumin+":"+sName+":"+Rtn );
    
        if (Rtn.equals("1")){
%>
		<script language="javascript">
        alert("실명인증 되었습니다.");
        
        </script>
<%
		}else if (Rtn.equals("2")){		
%>
            <script language="javascript">
                
              var URL ="http://www.creditbank.co.kr/its/its.cb?m=namecheckMismatch"; 
               var status = "toolbar=no,directories=no,scrollbars=no,resizable=no,status=no,menubar=no, width= 640, height= 480, top=0,left=20"; 
               window.open(URL,"",status);  
            </script> 
<%
		}else if (Rtn.equals("3")){
%>
            <script language="javascript">
                
               var URL ="http://www.creditbank.co.kr/its/its.cb?m=namecheckMismatch"; 
               var status = "toolbar=no,directories=no,scrollbars=no,resizable=no,status=no,menubar=no, width= 640, height= 480, top=0,left=20"; 
               window.open(URL,"",status); 
            </script> 
<%
		}else if (Rtn.equals("50")){
%>	
            <script language="javascript">
                
               var URL ="http://www.creditbank.co.kr/its/itsProtect.cb?m=namecheckProtected"; 
               var status = "toolbar=no,directories=no,scrollbars=no,resizable=no,status=no,menubar=no, width= 640, height= 480, top=0,left=20"; 
               window.open(URL,"",status); 
            </script> 

<%
		}else{
%>
			<script language='javascript'>
				alert("인증에 실패 하였습니다.");
				
			</script>			
<%
		}
}else{
	out.println("성명이나 주민번호를 확인하세요.");
}
%>

